﻿using HelloOne.Repositories;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace HelloOne.NewsSvc.Models
{
    /// <summary>
    /// 资讯类别
    /// </summary>
    public class Category : IEntity
    {
        public Category()
        {
            UpdatedDate = CreatedDate = DateTime.Now;
            IsDisabled = false;
            IsDeleted = false;
            ID = Guid.NewGuid();
        }
        public Category(string name, int sort, Guid? parentID) : this()
        {
            Name = name;
            Sort = sort;
            ParentID = parentID;
        }

        public Guid ID { get; set; }
        public string Name { get; set; }
        public int Sort { get; set; }
        public Guid? ParentID { get; set; }
        public DateTime CreatedDate { get; set; }
        public DateTime UpdatedDate { get; set; }
        /// <summary>
        /// true：禁用 
        /// false：启用
        /// </summary>
        public bool IsDisabled { get; set; }
        /// <summary>
        /// true：是
        /// false：否
        /// </summary>
        public bool IsDeleted { get; set; }
    }
}
